﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;

namespace ChartEdit
{
    public class RenderControl : Panel
    {
        public RenderControl()
        {
            this.SetStyle( ControlStyles.UserPaint, true );
            this.SetStyle( ControlStyles.OptimizedDoubleBuffer, true );
            this.SetStyle( ControlStyles.AllPaintingInWmPaint, true );
        }

        protected override void OnPaint( PaintEventArgs e )
        {
            e.Graphics.Clear( Color.Black );

            e.Graphics.DrawLine( Pens.Black, 0, 0, 0, 0 ); // etc

            // do your rendering here
        }
    }
}
